import React from 'react';
import {inject, observer} from 'mobx-react';
import AllWorkPlan from './AllWorkPlan'

@inject('myWorkPlanStore')
@observer
class WorkPlanViewList extends React.Component {
  constructor(props) {
		super(props);
		this.state={
            key:''
        }
  }
  componentDidMount() {
    this.props.myWorkPlanStore.setParams({workplanPreviewTable: false});    
 }
  componentWillReceiveProps(nextProps) {
     this.setState({key:nextProps.location.key});
  }
  componentWillUnmount() {
	  //组件卸载时一般清理一些状态
  }
  render() {
    return <AllWorkPlan workPlanShow="list"  location={{key:this.state.key}}/>
    }
}

export default WorkPlanViewList
